package com.guangpan.springboot.service;

import com.guangpan.springboot.mapper.UserInfoMapper;
import com.guangpan.springboot.model.UserInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserinfoServiceImpl implements UserinfoService {

    @Autowired
    private UserInfoMapper userInfoMapper;


    @Override
    public UserInfo loginUser(UserInfo userinfo) {
        return userInfoMapper.selectByUsernameAndPassword(userinfo);
    }

    @Override
    public int registerUser(UserInfo userinfo) {
        return userInfoMapper.insert(userinfo);
    }
}
